package com.sc.nft.feign;

import com.sc.nft.dto.IdRequest;
import com.sc.nft.dto.MerchantDaoAddDTO;
import com.sc.nft.sup.Result;
import com.sc.nft.vo.MerchantDaoGetByIdVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "nft-commercial", path = "/commercial/merchantDao")
public interface MerchantDaoClient {

    /**
     * 给dao新增或覆盖产品
     *
     * @param merchantDaoAddDTO
     * @return
     */
    @PostMapping("/addOrOverwrite")
    Result addOrOverwrite(@RequestBody @Validated MerchantDaoAddDTO merchantDaoAddDTO);

    /**
     * 根据id获取dao拥有的产品列表
     *
     * @param idRequest
     * @return
     */
    @PostMapping("/getDaoById")
    Result<MerchantDaoGetByIdVO> getDaoById(@RequestBody IdRequest idRequest);

}
